package com.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pojo.JurisdictionResources;
import com.pojo.RoleJurisdiction;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface RoleJurisdictionDAO extends BaseMapper<RoleJurisdiction> {
    IPage searchRole(Page page, @Param("m") Map m);

    List<Map> selectRoleNameAndUsername(@Param("user_name") String userName);

    @Select("select jurisdiction_id,jurisdiction_level,jurisdiction_name,resource from jurisdiction_resources")
    List<JurisdictionResources> selectJurisdictionName();

    @Select("select role_id,role_name,jurisdiction from role_jurisdiction")
    List<RoleJurisdiction> selectRole();
}